﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.Models.Schedule.ScheduleIndexViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Html.Encode( Model.EventDisplayName ) %> | Schedule
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><%= Html.Encode( Model.EventDisplayName ) %> Schedule</h2>
    <p>
      View the <%= Html.ActionLink( "Agenda", "Agenda" ) %> to see <%= Html.Encode( Model.EventDisplayName ) %> at a glance.
      View the <%= Html.ActionLink( "Schedule by Room", "Rooms" ) %> to see what's happening in each room.
    </p>
<%--    <p>
      Download the printable <a href="/Content/2010/PortlandCodeCamp2010Schedule.pdf">Session Schedule</a> (PDF).
    </p>
--%>    <p>
      Details are subject to change. But you already knew that.
    </p>
    <h3>Saturday, June 2, 2012</h3>
    <table class="schedule">
      <tr class="horizontalLayout">
        <td class="col1"></td>
        <td class="col2"></td>
        <td class="col3"></td>
        <td class="col4"></td>
        <td class="col5"></td>
        <td class="col6"></td>
      </tr>
      <% foreach ( var timeslot in Model.Timeslots )
         { %>
            <tr class="timeslotRow">
              <td class="startTime" colspan="2"><%= Html.Encode( timeslot.StartTime.ToShortTimeString() ) %>&nbsp;&ndash;</td>
              <td class="endTime"><%= Html.Encode( timeslot.EndTime.ToShortTimeString() ) %></td>
              <td class="name" colspan="3"><%= Html.Encode( timeslot.Name ) %></td>
            </tr>
            <% foreach ( var session in timeslot.Sessions )
               { %>
                  <tr class="sessionRow">
                    <td>&nbsp;</td>
                    <td class="title" colspan="3">
                      <%= Html.ActionLink( session.Title, "Details", "Sessions", new { id = session.SessionId }, null ) %>
                    </td>
                    <td class="presenters">
                      <% bool firstPresenter = true;
                          foreach ( var presenter in session.Presenters )
                          {
                            if ( !firstPresenter ) { %>,  <% }
                            firstPresenter = false; %>
                            <%= Html.ActionLink( presenter.Name, "Details", "Presenters", new { id = presenter.PressenterId }, null ) %><% } %>
                    </td>
                    <td class="location">
                      <%= Html.ActionLink( string.Format( "{0}, {1}", session.Building, session.Room ), "Room", new { id = session.RoomId }, null )%>
                    </td>
                  </tr>        
            <% }
         } %>
    </table>
      
</asp:Content>

